class Article < ActiveRecord::Base
  has_many :faq_relations
  has_many :faqs, :through => :faq_relations
  belongs_to :help_category

  def to_param
    "#{id}-" + title.downcase.gsub(/[åä]+/,'a').gsub(/[ö]+/,'o').gsub(/[^a-z0-9\s_-]+/,'').gsub(/[\s_-]+/,'-')
  end
end
